private string hex2binary(string hexvalue){ string binaryval = ""; binaryval = Convert.ToString(Convert.ToInt32(hexvalue, 16), 2); return binaryval;}